﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Infrastructure.Silverlight.Views
{
    public abstract class MasterPresenter : System.ComponentModel.INotifyPropertyChanged
    {
        protected object _View;
        public System.Threading.SynchronizationContext Context { get; set; }
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        protected void InvokePropertyChange(string propertyName)
        {
            if ( PropertyChanged != null) PropertyChanged(this,  new System.ComponentModel.PropertyChangedEventArgs(propertyName));
        }

        public abstract void OnViewReady();
        

    }
    public abstract class MasterPresenter<TView> : MasterPresenter
    {
        public TView View { get { return (TView)this._View; } set { this._View = value; } }
    }
    public abstract class MasterMVVM : System.ComponentModel.INotifyPropertyChanged
    {        
        public System.Threading.SynchronizationContext Context { get; set; }
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        protected void InvokePropertyChange(string propertyName)
        {
            if (PropertyChanged != null) PropertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
        }
        public abstract void OnViewReady();
    }

}
